package com.example.service.pc;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.entity.dto.pc.ResourceGroupListDto;
import com.example.entity.mysql.Resourcegroup;
import com.example.entity.vo.pc.LoadTimeVo;
import com.example.entity.vo.pc.ResourceGroupLoadVo;
import com.example.entity.vo.pc.ResourceGroupVo;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author LiangPandeng
 * @since 2024-05-19
 */
@DS("mes")
public interface ResourcegroupService extends IService<Resourcegroup> {

    List<Resourcegroup> getResourceGroupListFromRedis();

    List<ResourceGroupVo> resourceGroupList(ResourceGroupListDto dto);

    Integer getOriginIdById(Integer id);
    /**
     * 查出节点的根节点
     * @param id
     * @param posMap
     * @return
     */
    Integer getOriginIdById(Integer id, Map<Integer, Resourcegroup> posMap);

    /**
     * 查看资源组负荷
     * @param id 资源组id
     * @param l  日期区间
     * @param r
     * @return
     */
    List<ResourceGroupLoadVo> getResourceGroupLoad(Integer id, String l, String r);

    /**
     * 查看资源组中具体资源负荷
     * @return
     */
    List<ResourceGroupLoadVo> getResourceLoad(Integer id);

    List<LoadTimeVo> getResourceGroupLoadList();

}
